package com.mzz.Switch;

import java.util.ArrayList;
import java.util.List;
public class Switch {
    public List<dianqi> list;
    public Switch(){
        this.list=new ArrayList<>();
    }
    //增加
    public void addlist(dianqi d){
        list.add(d);
    }
    //删除
    public void removelist(dianqi d){
        list.remove(d);
    }
    //打开
    public void openAll(){
        for(dianqi list:list){
            list.open();
        }
    }
    //关闭
    public void closeAll(){
        for(dianqi list:list){
            list.close();
        }
    }
}
